package com.xmut.mall.coupon.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xmut.mall.coupon.entity.FullDiscountEntity;
import com.xmut.mall.coupon.searchparams.ManagerFullDiscountSearchParam;
import com.xmut.mall.coupon.searchparams.SellerFullDiscountSearchParam;
import com.xmut.mall.coupon.utils.RespBean;
import com.xmut.mall.coupon.vo.AddFullDiscountVo;
import com.xmut.mall.coupon.vo.PageVO;

import java.util.List;
import java.util.Map;

public interface FullDiscountService extends IService<FullDiscountEntity> {

    /**
     * 添加满减
     * @param vo
     * @return
     */
    RespBean addFullDiscount(AddFullDiscountVo vo);

    /**
     * 获取卖家端的满减分页数据
     * @param vo
     * @param param
     * @return
     */
    RespBean getSellerFullDiscountPage(PageVO vo, SellerFullDiscountSearchParam param);


    /**
     * 根据传入的ID获取满减活动的详情
     * @param id
     * @return
     */
    RespBean getFullDiscountDetail(Long id);

    /**
     * 修改满减活动
     * @param vo
     * @return
     */
    RespBean editFullDiscount(AddFullDiscountVo vo);

    /**
     * 关闭当前的满减活动
     * @param id
     * @return
     */
    RespBean closeFullDiscount(Long id);

    /**
     * 重新开启活动
     * @param params
     * @return
     */
    RespBean openFullDiscount(Map<String, Object> params);

    /**
     * 删除满减活动
     * @param id
     * @return
     */
    RespBean deleteFullDiscount(Long id);

    /**
     * 获取商城管理端的满减活动分页数据
     * @param vo
     * @param param
     * @return
     */
    RespBean getManagerFullDiscountPage(PageVO vo, ManagerFullDiscountSearchParam param);

    /**
     * 获取商城官方后台的满减活动的详情
     * @param id
     * @return
     */
    RespBean getManagerFullDiscountDetail(Long id);

    /**
     * 获取商品详情里的满减优惠的信息
     * @param skuId
     * @return
     */
    RespBean getProductDetailFullDiscount(Long skuId);

    /**
     * 获取购物车结算时可用的满减活动
     * @param skuIds
     * @return
     */
    List<FullDiscountEntity> getCartCheckFullDiscount(List<Long> skuIds);
}
